All Packages Class Hierarchy This Package Previous Next Index
Class java.naming.NameClassPair
java.lang.Object
|
+----java.naming.NameClassPair
- public class NameClassPair
- extends Object
- implements Serializable
A context consists of name-to-object bindings.
The NameClassPair class represents the name and the
class of the bound object. It consists
of an atomic name and a string representing the
package-qualified class name.
Use subclassing for naming systems that generate contents of
a name/class pair dynamically.
-
className
-
-
name
-
-
NameClassPair(String, String)
- Constructs an instance of a NameClassPair given its atomic
name and class name.
-
getClassName()
- Retrieves the class name of the object bound to the name of this binding.
-
getName()
- Retrieves the atomic name of this binding.
-
toString()
- Generates the string representation of this name/class pair.
name
protected String name
className
protected String className
NameClassPair
public NameClassPair(String name,
String className)
- Constructs an instance of a NameClassPair given its atomic
name and class name.
- Parameters:
- name - The atomic name of the object.
- className - The class name of the object bound to name.
getClassName
public String getClassName()
- Retrieves the class name of the object bound to the name of this binding.
If a reference or some other indirect information is bound,
return the class name of the object of the eventual object that
will be returned by getObject().
- Returns:
- The class name of object bound.
getName
public String getName()
- Retrieves the atomic name of this binding.
- Returns:
- The atomic name of this binding.
toString
public String toString()
- Generates the string representation of this name/class pair.
The string representation consists of the name and class name separated
by a colon (':').
- Returns:
- The string representation of this name/class pair.
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index